﻿<UserControl
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:r="http://schemas.microsoft.com/winfx/2006/xaml/presentation/ribbon" x:Class="CommonSense.UI.Shell.Views.RootView" 
             mc:Ignorable="d" 
             d:DesignHeight="428" d:DesignWidth="634" Margin="2">
    <UserControl.Resources>
        <Style TargetType="{x:Type TabItem}">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type TabItem}">
                        <Grid>
                            <Border Background="LightBlue" Height="30" MinWidth="100" BorderThickness="1,1,1,0" BorderBrush="#8C8E94" CornerRadius="4" Margin="2 0" Padding="5 0">
                                <ContentPresenter ContentSource="Header" RecognizesAccessKey="True" VerticalAlignment="Center">

                                </ContentPresenter>
                            </Border>
                            <Border Height="30">
                                
                            </Border>
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

    </UserControl.Resources>
    <DockPanel LastChildFill="True">

        <r:Ribbon DockPanel.Dock="Top" Name="ribbon">
            <r:Ribbon.ApplicationMenu>
                <r:RibbonApplicationMenu Visibility="Collapsed" />
            </r:Ribbon.ApplicationMenu>
        </r:Ribbon>

        <Grid Background="#DFE9F5">
            <!--<TabControl Background="Orange" ItemsSource="{Binding OpenedItems}" SelectedItem="{Binding SelectedItem}" SelectedIndex="{Binding SelectedIndex}" Visibility="{Binding TabVisiblity, Converter={StaticResource ResourceKey=booleanToVisibilityConverter}}">-->
            <TabControl Background="LightBlue">
                <!--<TabControl.ItemTemplate>
                    <DataTemplate>
                        <Border BorderBrush="Red" BorderThickness="2">
                            <StackPanel Orientation="Horizontal">
                                <TextBlock Text="{Binding Title}"/>
                                <Button Content="X" Command="{Binding CloseCommand}"/>
                            </StackPanel>
                        </Border>
                    </DataTemplate>
                </TabControl.ItemTemplate>-->
                <TabControl.ContentTemplate>
                    <DataTemplate>
                        <UserControl Content="{Binding View}"/>
                    </DataTemplate>
                </TabControl.ContentTemplate>
                <TabItem Header="BUUKKKKA1">
                    <TextBlock>AAA</TextBlock>
                </TabItem>
                <TabItem Header="BUUKKKKA2">
                    <TextBlock>BBB</TextBlock>
                </TabItem>
            </TabControl>
        </Grid>
    </DockPanel>
</UserControl>
